package com.amose.springcloudoauth2server.authentication.service.impl;

import com.amose.springcloudoauth2server.authentication.entity.Permission;
import com.amose.springcloudoauth2server.authentication.mapper.PermissionMapper;
import com.amose.springcloudoauth2server.authentication.service.IPermissionService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author amose
 * @since 2021-07-01
 */
@Service
@Primary
public class PermissionServiceImpl extends ServiceImpl<PermissionMapper, Permission> implements IPermissionService {

    @Autowired
    PermissionMapper permissionMapper;

    @Override
    public List<Permission> queryPermissionListByUserId(Integer userId) {

        return permissionMapper.queryListByUserId(userId);
    }
}
